//
//  Extension+UIImageView.swift
//  XMWeimo
//
//  Created by ios001 on 16/7/20.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {
    // 实例化imageView快捷方式
    convenience init(imgName: String) {
        self.init(image: UIImage(named: imgName))
    }
    
    // 对 SDWebImage 封装
    func xm_setImage(urlString: String?, placeolderImgName: String){
        self.sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage: UIImage(named: placeolderImgName))
    }
}
